﻿using System;
using System.Data;
using System.Data.Common;
using Hxj.Data;
using Hxj.Data.Common;

namespace RecruitStudents.Utility.Model
{

	/// <summary>
	/// 实体类TB_Sys_Module 。(属性说明自动提取数据库字段的描述信息)
	/// </summary>
	[Serializable]
	public class TB_Sys_Module : Entity 
	{
		public TB_Sys_Module():base("TB_Sys_Module") {    _ID=Guid.NewGuid().ToString();}

        #region Model
        private string _ID;
        private string _Assembly;
        private string _WinformName;
        private string _MenuName;
        private string _FunctionType;
        private string _MenuNameAS;
        private string _Remark;
        private string _ParentID;
        private string _ModuleID;
        private int? _Sort;
        /// <summary>
        /// 主键ID
        /// </summary>
        public string ID
        {
            get { return _ID; }
            set
            {
                this.OnPropertyValueChange(_.ID, _ID, value);
                this._ID = value;
            }
        }
        /// <summary>
        /// 程序集
        /// </summary>
        public string Assembly
        {
            get { return _Assembly; }
            set
            {
                this.OnPropertyValueChange(_.Assembly, _Assembly, value);
                this._Assembly = value;
            }
        }
        /// <summary>
        /// 完整页面名称（加命名空间）
        /// </summary>
        public string WinformName
        {
            get { return _WinformName; }
            set
            {
                this.OnPropertyValueChange(_.WinformName, _WinformName, value);
                this._WinformName = value;
            }
        }
        /// <summary>
        /// 菜单名
        /// </summary>
        public string MenuName
        {
            get { return _MenuName; }
            set
            {
                this.OnPropertyValueChange(_.MenuName, _MenuName, value);
                this._MenuName = value;
            }
        }
        /// <summary>
        /// 类型
        /// </summary>
        public string FunctionType
        {
            get { return _FunctionType; }
            set
            {
                this.OnPropertyValueChange(_.FunctionType, _FunctionType, value);
                this._FunctionType = value;
            }
        }
        /// <summary>
        /// 别名
        /// </summary>
        public string MenuNameAS
        {
            get { return _MenuNameAS; }
            set
            {
                this.OnPropertyValueChange(_.MenuNameAS, _MenuNameAS, value);
                this._MenuNameAS = value;
            }
        }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark
        {
            get { return _Remark; }
            set
            {
                this.OnPropertyValueChange(_.Remark, _Remark, value);
                this._Remark = value;
            }
        }
        /// <summary>
        /// 父级ID
        /// </summary>
        public string ParentID
        {
            get { return _ParentID; }
            set
            {
                this.OnPropertyValueChange(_.ParentID, _ParentID, value);
                this._ParentID = value;
            }
        }
        /// <summary>
        /// 模块ID
        /// </summary>
        public string ModuleID
        {
            get { return _ModuleID; }
            set
            {
                this.OnPropertyValueChange(_.ModuleID, _ModuleID, value);
                this._ModuleID = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? Sort
        {
            get { return _Sort; }
            set
            {
                this.OnPropertyValueChange(_.Sort, _Sort, value);
                this._Sort = value;
            }
        }
        #endregion

        #region Method
        /// <summary>
        /// 获取实体中的主键列
        /// </summary>
        public override Field[] GetPrimaryKeyFields()
        {
            return new Field[] {
				_.ID};
        }
        /// <summary>
        /// 获取列信息
        /// </summary>
        public override Field[] GetFields()
        {
            return new Field[] {
				_.ID,
				_.Assembly,
				_.WinformName,
				_.MenuName,
				_.FunctionType,
				_.MenuNameAS,
				_.Remark,
				_.ParentID,
				_.ModuleID,
				_.Sort};
        }
        /// <summary>
        /// 获取值信息
        /// </summary>
        public override object[] GetValues()
        {
            return new object[] {
				this._ID,
				this._Assembly,
				this._WinformName,
				this._MenuName,
				this._FunctionType,
				this._MenuNameAS,
				this._Remark,
				this._ParentID,
				this._ModuleID,
				this._Sort};
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(IDataReader reader)
        {
            this._ID = DataUtils.ConvertValue<string>(reader["ID"]);
            this._Assembly = DataUtils.ConvertValue<string>(reader["Assembly"]);
            this._WinformName = DataUtils.ConvertValue<string>(reader["WinformName"]);
            this._MenuName = DataUtils.ConvertValue<string>(reader["MenuName"]);
            this._FunctionType = DataUtils.ConvertValue<string>(reader["FunctionType"]);
            this._MenuNameAS = DataUtils.ConvertValue<string>(reader["MenuNameAS"]);
            this._Remark = DataUtils.ConvertValue<string>(reader["Remark"]);
            this._ParentID = DataUtils.ConvertValue<string>(reader["ParentID"]);
            this._ModuleID = DataUtils.ConvertValue<string>(reader["ModuleID"]);
            this._Sort = DataUtils.ConvertValue<int?>(reader["Sort"]);
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(DataRow row)
        {
            this._ID = DataUtils.ConvertValue<string>(row["ID"]);
            this._Assembly = DataUtils.ConvertValue<string>(row["Assembly"]);
            this._WinformName = DataUtils.ConvertValue<string>(row["WinformName"]);
            this._MenuName = DataUtils.ConvertValue<string>(row["MenuName"]);
            this._FunctionType = DataUtils.ConvertValue<string>(row["FunctionType"]);
            this._MenuNameAS = DataUtils.ConvertValue<string>(row["MenuNameAS"]);
            this._Remark = DataUtils.ConvertValue<string>(row["Remark"]);
            this._ParentID = DataUtils.ConvertValue<string>(row["ParentID"]);
            this._ModuleID = DataUtils.ConvertValue<string>(row["ModuleID"]);
            this._Sort = DataUtils.ConvertValue<int?>(row["Sort"]);
        }
        #endregion

        #region _Field
        /// <summary>
        /// 字段信息
        /// </summary>
        public class _
        {
            /// <summary>
            /// * 
            /// </summary>
            public readonly static Field All = new Field("*", "TB_Sys_Module");
            /// <summary>
            /// 主键ID
            /// </summary>
            public readonly static Field ID = new Field("ID", "TB_Sys_Module", "主键ID");
            /// <summary>
            /// 程序集
            /// </summary>
            public readonly static Field Assembly = new Field("Assembly", "TB_Sys_Module", "程序集");
            /// <summary>
            /// 完整页面名称（加命名空间）
            /// </summary>
            public readonly static Field WinformName = new Field("WinformName", "TB_Sys_Module", "完整页面名称（加命名空间）");
            /// <summary>
            /// 菜单名
            /// </summary>
            public readonly static Field MenuName = new Field("MenuName", "TB_Sys_Module", "菜单名");
            /// <summary>
            /// 类型
            /// </summary>
            public readonly static Field FunctionType = new Field("FunctionType", "TB_Sys_Module", "类型");
            /// <summary>
            /// 别名
            /// </summary>
            public readonly static Field MenuNameAS = new Field("MenuNameAS", "TB_Sys_Module", "别名");
            /// <summary>
            /// 备注
            /// </summary>
            public readonly static Field Remark = new Field("Remark", "TB_Sys_Module", "备注");
            /// <summary>
            /// 父级ID
            /// </summary>
            public readonly static Field ParentID = new Field("ParentID", "TB_Sys_Module", "父级ID");
            /// <summary>
            /// 模块ID
            /// </summary>
            public readonly static Field ModuleID = new Field("ModuleID", "TB_Sys_Module", "模块ID");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field Sort = new Field("Sort", "TB_Sys_Module", "Sort");
        }
        #endregion


    }
}


